package com.itheima.view.views;

import javax.swing.*;

public class CustomPanel extends JFrame {
    CustomPanel(int x, int y, int h, int w) {
        super("窗口");//重写父类方法，为创建就定义标题
        setLocation(x, y);
        setSize(h, w);

        setResizable(false);
        setVisible(true);
        setDefaultCloseOperation(EXIT_ON_CLOSE);//单击右上角关闭按钮时 真正退出程序

    }
}
/*
class JFrameDemo2 {
    public static void main(String[] args) {
        CustomPanel myFrame = new CustomPanel(300, 300, 300, 200);//实例化类对象，设置参数
    }
}*/

